3.49 \(\int \frac{d+e x+f x^2+g x^3}{(1+x^2+x^4)^3} \, dx\)

Optimal. Leaf size=243 \[ \frac{x \left (-7 x^2 (d-f)+2 d+3 f\right )}{24 \left (x^4+x^2+1\right )}+\frac{x \left (x^2 (-(d-2 f))+d+f\right )}{12 \left (x^4+x^2+1\right )^2}-\frac{1}{32} (9 d-4 f) \log \left (x^2-x+1\right )+\frac{1}{32} (9 d-4 f) \log \left (x^2+x+1\right )-\frac{(13 d+2 f) \tan ^{-1}\left (\frac{1-2 x}{\sqrt{3}}\right )}{48 \sqrt{3}}+\frac{(13 d+2 f) \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{48 \sqrt{3}}+\frac{\left (2 x^2+1\right ) (2 e-g)}{12 \left (x^4+x^2+1\right )}+\frac{x^2 (2 e-g)+e-2 g}{12 \left (x^4+x^2+1\right )^2}+\frac{(2 e-g) \tan ^{-1}\left (\frac{2 x^2+1}{\sqrt{3}}\right )}{3 \sqrt{3}} \]

[Out]

(x*(d + f - (d - 2*f)*x^2))/(12*(1 + x^2 + x^4)^2) + (e - 2*g + (2*e - g)*x^2)/(12*(1 + x^2 + x^4)^2) + ((2*e
- g)*(1 + 2*x^2))/(12*(1 + x^2 + x^4)) + (x*(2*d + 3*f - 7*(d - f)*x^2))/(24*(1 + x^2 + x^4)) - ((13*d + 2*f)*
ArcTan[(1 - 2*x)/Sqrt[3]])/(48*Sqrt[3]) + ((13*d + 2*f)*ArcTan[(1 + 2*x)/Sqrt[3]])/(48*Sqrt[3]) + ((2*e - g)*A
rcTan[(1 + 2*x^2)/Sqrt[3]])/(3*Sqrt[3]) - ((9*d - 4*f)*Log[1 - x + x^2])/32 + ((9*d - 4*f)*Log[1 + x + x^2])/3
2

________________________________________________________________________________________

Rubi [A]  time = 0.227032, antiderivative size = 243, normalized size of antiderivative = 1., number of steps used = 17, number of rules used = 10, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {1673, 1178, 1169, 634, 618, 204, 628, 1247, 638, 614} \[ \frac{x \left (-7 x^2 (d-f)+2 d+3 f\right )}{24 \left (x^4+x^2+1\right )}+\frac{x \left (x^2 (-(d-2 f))+d+f\right )}{12 \left (x^4+x^2+1\right )^2}-\frac{1}{32} (9 d-4 f) \log \left (x^2-x+1\right )+\frac{1}{32} (9 d-4 f) \log \left (x^2+x+1\right )-\frac{(13 d+2 f) \tan ^{-1}\left (\frac{1-2 x}{\sqrt{3}}\right )}{48 \sqrt{3}}+\frac{(13 d+2 f) \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{48 \sqrt{3}}+\frac{\left (2 x^2+1\right ) (2 e-g)}{12 \left (x^4+x^2+1\right )}+\frac{x^2 (2 e-g)+e-2 g}{12 \left (x^4+x^2+1\right )^2}+\frac{(2 e-g) \tan ^{-1}\left (\frac{2 x^2+1}{\sqrt{3}}\right )}{3 \sqrt{3}} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x + f*x^2 + g*x^3)/(1 + x^2 + x^4)^3,x]

[Out]

(x*(d + f - (d - 2*f)*x^2))/(12*(1 + x^2 + x^4)^2) + (e - 2*g + (2*e - g)*x^2)/(12*(1 + x^2 + x^4)^2) + ((2*e
- g)*(1 + 2*x^2))/(12*(1 + x^2 + x^4)) + (x*(2*d + 3*f - 7*(d - f)*x^2))/(24*(1 + x^2 + x^4)) - ((13*d + 2*f)*
ArcTan[(1 - 2*x)/Sqrt[3]])/(48*Sqrt[3]) + ((13*d + 2*f)*ArcTan[(1 + 2*x)/Sqrt[3]])/(48*Sqrt[3]) + ((2*e - g)*A
rcTan[(1 + 2*x^2)/Sqrt[3]])/(3*Sqrt[3]) - ((9*d - 4*f)*Log[1 - x + x^2])/32 + ((9*d - 4*f)*Log[1 + x + x^2])/3
2

Rule 1673

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rule 1178

Int[((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[(x*(a*b*e - d*(b^2 - 2*
a*c) - c*(b*d - 2*a*e)*x^2)*(a + b*x^2 + c*x^4)^(p + 1))/(2*a*(p + 1)*(b^2 - 4*a*c)), x] + Dist[1/(2*a*(p + 1)
*(b^2 - 4*a*c)), Int[Simp[(2*p + 3)*d*b^2 - a*b*e - 2*a*c*d*(4*p + 5) + (4*p + 7)*(d*b - 2*a*e)*c*x^2, x]*(a +
 b*x^2 + c*x^4)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e
^2, 0] && LtQ[p, -1] && IntegerQ[2*p]

Rule 1169

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r =
Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(
d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2
- b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1247

Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[
Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]

Rule 638

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b*d - 2*a*e + (2*c*d -
b*e)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c)), x] - Dist[((2*p + 3)*(2*c*d - b*e))/((p + 1)*(b^2
- 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^
2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2]

Rule 614

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b + 2*c*x)*(a + b*x + c*x^2)^(p + 1))/((p +
1)*(b^2 - 4*a*c)), x] - Dist[(2*c*(2*p + 3))/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1), x], x] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2] && IntegerQ[4*p]

Rubi steps

\begin{align*} \int \frac{d+e x+f x^2+g x^3}{\left (1+x^2+x^4\right )^3} \, dx &=\int \frac{d+f x^2}{\left (1+x^2+x^4\right )^3} \, dx+\int \frac{x \left (e+g x^2\right )}{\left (1+x^2+x^4\right )^3} \, dx\\ &=\frac{x \left (d+f-(d-2 f) x^2\right )}{12 \left (1+x^2+x^4\right )^2}+\frac{1}{12} \int \frac{11 d-f-5 (d-2 f) x^2}{\left (1+x^2+x^4\right )^2} \, dx+\frac{1}{2} \operatorname{Subst}\left (\int \frac{e+g x}{\left (1+x+x^2\right )^3} \, dx,x,x^2\right )\\ &=\frac{x \left (d+f-(d-2 f) x^2\right )}{12 \left (1+x^2+x^4\right )^2}+\frac{e-2 g+(2 e-g) x^2}{12 \left (1+x^2+x^4\right )^2}+\frac{x \left (2 d+3 f-7 (d-f) x^2\right )}{24 \left (1+x^2+x^4\right )}+\frac{1}{72} \int \frac{15 (4 d-f)-21 (d-f) x^2}{1+x^2+x^4} \, dx+\frac{1}{4} (2 e-g) \operatorname{Subst}\left (\int \frac{1}{\left (1+x+x^2\right )^2} \, dx,x,x^2\right )\\ &=\frac{x \left (d+f-(d-2 f) x^2\right )}{12 \left (1+x^2+x^4\right )^2}+\frac{e-2 g+(2 e-g) x^2}{12 \left (1+x^2+x^4\right )^2}+\frac{(2 e-g) \left (1+2 x^2\right )}{12 \left (1+x^2+x^4\right )}+\frac{x \left (2 d+3 f-7 (d-f) x^2\right )}{24 \left (1+x^2+x^4\right )}+\frac{1}{144} \int \frac{15 (4 d-f)-(21 (d-f)+15 (4 d-f)) x}{1-x+x^2} \, dx+\frac{1}{144} \int \frac{15 (4 d-f)+(21 (d-f)+15 (4 d-f)) x}{1+x+x^2} \, dx+\frac{1}{6} (2 e-g) \operatorname{Subst}\left (\int \frac{1}{1+x+x^2} \, dx,x,x^2\right )\\ &=\frac{x \left (d+f-(d-2 f) x^2\right )}{12 \left (1+x^2+x^4\right )^2}+\frac{e-2 g+(2 e-g) x^2}{12 \left (1+x^2+x^4\right )^2}+\frac{(2 e-g) \left (1+2 x^2\right )}{12 \left (1+x^2+x^4\right )}+\frac{x \left (2 d+3 f-7 (d-f) x^2\right )}{24 \left (1+x^2+x^4\right )}+\frac{1}{32} (9 d-4 f) \int \frac{1+2 x}{1+x+x^2} \, dx+\frac{1}{96} (13 d+2 f) \int \frac{1}{1-x+x^2} \, dx+\frac{1}{96} (13 d+2 f) \int \frac{1}{1+x+x^2} \, dx+\frac{1}{32} (-9 d+4 f) \int \frac{-1+2 x}{1-x+x^2} \, dx+\frac{1}{3} (-2 e+g) \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+2 x^2\right )\\ &=\frac{x \left (d+f-(d-2 f) x^2\right )}{12 \left (1+x^2+x^4\right )^2}+\frac{e-2 g+(2 e-g) x^2}{12 \left (1+x^2+x^4\right )^2}+\frac{(2 e-g) \left (1+2 x^2\right )}{12 \left (1+x^2+x^4\right )}+\frac{x \left (2 d+3 f-7 (d-f) x^2\right )}{24 \left (1+x^2+x^4\right )}+\frac{(2 e-g) \tan ^{-1}\left (\frac{1+2 x^2}{\sqrt{3}}\right )}{3 \sqrt{3}}-\frac{1}{32} (9 d-4 f) \log \left (1-x+x^2\right )+\frac{1}{32} (9 d-4 f) \log \left (1+x+x^2\right )+\frac{1}{48} (-13 d-2 f) \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,-1+2 x\right )+\frac{1}{48} (-13 d-2 f) \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+2 x\right )\\ &=\frac{x \left (d+f-(d-2 f) x^2\right )}{12 \left (1+x^2+x^4\right )^2}+\frac{e-2 g+(2 e-g) x^2}{12 \left (1+x^2+x^4\right )^2}+\frac{(2 e-g) \left (1+2 x^2\right )}{12 \left (1+x^2+x^4\right )}+\frac{x \left (2 d+3 f-7 (d-f) x^2\right )}{24 \left (1+x^2+x^4\right )}-\frac{(13 d+2 f) \tan ^{-1}\left (\frac{1-2 x}{\sqrt{3}}\right )}{48 \sqrt{3}}+\frac{(13 d+2 f) \tan ^{-1}\left (\frac{1+2 x}{\sqrt{3}}\right )}{48 \sqrt{3}}+\frac{(2 e-g) \tan ^{-1}\left (\frac{1+2 x^2}{\sqrt{3}}\right )}{3 \sqrt{3}}-\frac{1}{32} (9 d-4 f) \log \left (1-x+x^2\right )+\frac{1}{32} (9 d-4 f) \log \left (1+x+x^2\right )\\ \end{align*}

Mathematica [C]  time = 0.749252, size = 259, normalized size = 1.07 \[ \frac{1}{144} \left (\frac{6 \left (-7 d x^3+2 d x+e \left (8 x^2+4\right )+7 f x^3+3 f x-2 g \left (2 x^2+1\right )\right )}{x^4+x^2+1}+\frac{12 \left (x \left (-d x^2+d+2 f x^2+f\right )+2 e x^2+e-g \left (x^2+2\right )\right )}{\left (x^4+x^2+1\right )^2}-\frac{\left (\left (7 \sqrt{3}-47 i\right ) d+\left (-7 \sqrt{3}+17 i\right ) f\right ) \tan ^{-1}\left (\frac{1}{2} \left (\sqrt{3}-i\right ) x\right )}{\sqrt{\frac{1}{6} \left (1+i \sqrt{3}\right )}}-\frac{\left (\left (7 \sqrt{3}+47 i\right ) d-\left (7 \sqrt{3}+17 i\right ) f\right ) \tan ^{-1}\left (\frac{1}{2} \left (\sqrt{3}+i\right ) x\right )}{\sqrt{\frac{1}{6} \left (1-i \sqrt{3}\right )}}-16 \sqrt{3} (2 e-g) \tan ^{-1}\left (\frac{\sqrt{3}}{2 x^2+1}\right )\right ) \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(d + e*x + f*x^2 + g*x^3)/(1 + x^2 + x^4)^3,x]

[Out]

((6*(2*d*x + 3*f*x - 7*d*x^3 + 7*f*x^3 - 2*g*(1 + 2*x^2) + e*(4 + 8*x^2)))/(1 + x^2 + x^4) + (12*(e + 2*e*x^2
- g*(2 + x^2) + x*(d + f - d*x^2 + 2*f*x^2)))/(1 + x^2 + x^4)^2 - (((-47*I + 7*Sqrt[3])*d + (17*I - 7*Sqrt[3])
*f)*ArcTan[((-I + Sqrt[3])*x)/2])/Sqrt[(1 + I*Sqrt[3])/6] - (((47*I + 7*Sqrt[3])*d - (17*I + 7*Sqrt[3])*f)*Arc
Tan[((I + Sqrt[3])*x)/2])/Sqrt[(1 - I*Sqrt[3])/6] - 16*Sqrt[3]*(2*e - g)*ArcTan[Sqrt[3]/(1 + 2*x^2)])/144

________________________________________________________________________________________

Maple [A]  time = 0.016, size = 322, normalized size = 1.3 \begin{align*}{\frac{1}{16\, \left ({x}^{2}+x+1 \right ) ^{2}} \left ( \left ( -{\frac{7\,d}{3}}+{\frac{7\,f}{3}}-{\frac{4\,e}{3}}-{\frac{g}{3}} \right ){x}^{3}+ \left ( -6\,d+4\,f-2\,g \right ){x}^{2}+ \left ( -{\frac{20\,d}{3}}+{\frac{13\,f}{3}}+{\frac{e}{3}}-{\frac{8\,g}{3}} \right ) x-4\,d+{\frac{4\,f}{3}}+2\,e-2\,g \right ) }+{\frac{9\,d\ln \left ({x}^{2}+x+1 \right ) }{32}}-{\frac{\ln \left ({x}^{2}+x+1 \right ) f}{8}}+{\frac{13\,d\sqrt{3}}{144}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }-{\frac{2\,\sqrt{3}e}{9}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }+{\frac{\sqrt{3}f}{72}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }+{\frac{\sqrt{3}g}{9}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }-{\frac{1}{16\, \left ({x}^{2}-x+1 \right ) ^{2}} \left ( \left ({\frac{7\,d}{3}}-{\frac{7\,f}{3}}-{\frac{4\,e}{3}}-{\frac{g}{3}} \right ){x}^{3}+ \left ( -6\,d+4\,f+2\,g \right ){x}^{2}+ \left ({\frac{20\,d}{3}}-{\frac{13\,f}{3}}+{\frac{e}{3}}-{\frac{8\,g}{3}} \right ) x-4\,d+{\frac{4\,f}{3}}-2\,e+2\,g \right ) }-{\frac{9\,d\ln \left ({x}^{2}-x+1 \right ) }{32}}+{\frac{\ln \left ({x}^{2}-x+1 \right ) f}{8}}+{\frac{13\,d\sqrt{3}}{144}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) }+{\frac{2\,\sqrt{3}e}{9}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) }+{\frac{\sqrt{3}f}{72}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) }-{\frac{\sqrt{3}g}{9}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x^3+f*x^2+e*x+d)/(x^4+x^2+1)^3,x)

[Out]

1/16*((-7/3*d+7/3*f-4/3*e-1/3*g)*x^3+(-6*d+4*f-2*g)*x^2+(-20/3*d+13/3*f+1/3*e-8/3*g)*x-4*d+4/3*f+2*e-2*g)/(x^2
+x+1)^2+9/32*d*ln(x^2+x+1)-1/8*ln(x^2+x+1)*f+13/144*d*arctan(1/3*(1+2*x)*3^(1/2))*3^(1/2)-2/9*3^(1/2)*arctan(1
/3*(1+2*x)*3^(1/2))*e+1/72*3^(1/2)*arctan(1/3*(1+2*x)*3^(1/2))*f+1/9*3^(1/2)*arctan(1/3*(1+2*x)*3^(1/2))*g-1/1
6*((7/3*d-7/3*f-4/3*e-1/3*g)*x^3+(-6*d+4*f+2*g)*x^2+(20/3*d-13/3*f+1/3*e-8/3*g)*x-4*d+4/3*f-2*e+2*g)/(x^2-x+1)
^2-9/32*d*ln(x^2-x+1)+1/8*ln(x^2-x+1)*f+13/144*3^(1/2)*arctan(1/3*(2*x-1)*3^(1/2))*d+2/9*3^(1/2)*arctan(1/3*(2
*x-1)*3^(1/2))*e+1/72*3^(1/2)*arctan(1/3*(2*x-1)*3^(1/2))*f-1/9*3^(1/2)*arctan(1/3*(2*x-1)*3^(1/2))*g

________________________________________________________________________________________

Maxima [A]  time = 1.42711, size = 270, normalized size = 1.11 \begin{align*} \frac{1}{144} \, \sqrt{3}{\left (13 \, d - 32 \, e + 2 \, f + 16 \, g\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + \frac{1}{144} \, \sqrt{3}{\left (13 \, d + 32 \, e + 2 \, f - 16 \, g\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x - 1\right )}\right ) + \frac{1}{32} \,{\left (9 \, d - 4 \, f\right )} \log \left (x^{2} + x + 1\right ) - \frac{1}{32} \,{\left (9 \, d - 4 \, f\right )} \log \left (x^{2} - x + 1\right ) - \frac{7 \,{\left (d - f\right )} x^{7} - 4 \,{\left (2 \, e - g\right )} x^{6} + 5 \,{\left (d - 2 \, f\right )} x^{5} - 6 \,{\left (2 \, e - g\right )} x^{4} + 7 \,{\left (d - 2 \, f\right )} x^{3} - 8 \,{\left (2 \, e - g\right )} x^{2} -{\left (4 \, d + 5 \, f\right )} x - 6 \, e + 6 \, g}{24 \,{\left (x^{8} + 2 \, x^{6} + 3 \, x^{4} + 2 \, x^{2} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x^3+f*x^2+e*x+d)/(x^4+x^2+1)^3,x, algorithm="maxima")

[Out]

1/144*sqrt(3)*(13*d - 32*e + 2*f + 16*g)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/144*sqrt(3)*(13*d + 32*e + 2*f - 16
*g)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/32*(9*d - 4*f)*log(x^2 + x + 1) - 1/32*(9*d - 4*f)*log(x^2 - x + 1) - 1/
24*(7*(d - f)*x^7 - 4*(2*e - g)*x^6 + 5*(d - 2*f)*x^5 - 6*(2*e - g)*x^4 + 7*(d - 2*f)*x^3 - 8*(2*e - g)*x^2 -
(4*d + 5*f)*x - 6*e + 6*g)/(x^8 + 2*x^6 + 3*x^4 + 2*x^2 + 1)

________________________________________________________________________________________

Fricas [A]  time = 4.00098, size = 1111, normalized size = 4.57 \begin{align*} -\frac{84 \,{\left (d - f\right )} x^{7} - 48 \,{\left (2 \, e - g\right )} x^{6} + 60 \,{\left (d - 2 \, f\right )} x^{5} - 72 \,{\left (2 \, e - g\right )} x^{4} + 84 \,{\left (d - 2 \, f\right )} x^{3} - 96 \,{\left (2 \, e - g\right )} x^{2} - 2 \, \sqrt{3}{\left ({\left (13 \, d - 32 \, e + 2 \, f + 16 \, g\right )} x^{8} + 2 \,{\left (13 \, d - 32 \, e + 2 \, f + 16 \, g\right )} x^{6} + 3 \,{\left (13 \, d - 32 \, e + 2 \, f + 16 \, g\right )} x^{4} + 2 \,{\left (13 \, d - 32 \, e + 2 \, f + 16 \, g\right )} x^{2} + 13 \, d - 32 \, e + 2 \, f + 16 \, g\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) - 2 \, \sqrt{3}{\left ({\left (13 \, d + 32 \, e + 2 \, f - 16 \, g\right )} x^{8} + 2 \,{\left (13 \, d + 32 \, e + 2 \, f - 16 \, g\right )} x^{6} + 3 \,{\left (13 \, d + 32 \, e + 2 \, f - 16 \, g\right )} x^{4} + 2 \,{\left (13 \, d + 32 \, e + 2 \, f - 16 \, g\right )} x^{2} + 13 \, d + 32 \, e + 2 \, f - 16 \, g\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x - 1\right )}\right ) - 12 \,{\left (4 \, d + 5 \, f\right )} x - 9 \,{\left ({\left (9 \, d - 4 \, f\right )} x^{8} + 2 \,{\left (9 \, d - 4 \, f\right )} x^{6} + 3 \,{\left (9 \, d - 4 \, f\right )} x^{4} + 2 \,{\left (9 \, d - 4 \, f\right )} x^{2} + 9 \, d - 4 \, f\right )} \log \left (x^{2} + x + 1\right ) + 9 \,{\left ({\left (9 \, d - 4 \, f\right )} x^{8} + 2 \,{\left (9 \, d - 4 \, f\right )} x^{6} + 3 \,{\left (9 \, d - 4 \, f\right )} x^{4} + 2 \,{\left (9 \, d - 4 \, f\right )} x^{2} + 9 \, d - 4 \, f\right )} \log \left (x^{2} - x + 1\right ) - 72 \, e + 72 \, g}{288 \,{\left (x^{8} + 2 \, x^{6} + 3 \, x^{4} + 2 \, x^{2} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x^3+f*x^2+e*x+d)/(x^4+x^2+1)^3,x, algorithm="fricas")

[Out]

-1/288*(84*(d - f)*x^7 - 48*(2*e - g)*x^6 + 60*(d - 2*f)*x^5 - 72*(2*e - g)*x^4 + 84*(d - 2*f)*x^3 - 96*(2*e -
 g)*x^2 - 2*sqrt(3)*((13*d - 32*e + 2*f + 16*g)*x^8 + 2*(13*d - 32*e + 2*f + 16*g)*x^6 + 3*(13*d - 32*e + 2*f
+ 16*g)*x^4 + 2*(13*d - 32*e + 2*f + 16*g)*x^2 + 13*d - 32*e + 2*f + 16*g)*arctan(1/3*sqrt(3)*(2*x + 1)) - 2*s
qrt(3)*((13*d + 32*e + 2*f - 16*g)*x^8 + 2*(13*d + 32*e + 2*f - 16*g)*x^6 + 3*(13*d + 32*e + 2*f - 16*g)*x^4 +
 2*(13*d + 32*e + 2*f - 16*g)*x^2 + 13*d + 32*e + 2*f - 16*g)*arctan(1/3*sqrt(3)*(2*x - 1)) - 12*(4*d + 5*f)*x
 - 9*((9*d - 4*f)*x^8 + 2*(9*d - 4*f)*x^6 + 3*(9*d - 4*f)*x^4 + 2*(9*d - 4*f)*x^2 + 9*d - 4*f)*log(x^2 + x + 1
) + 9*((9*d - 4*f)*x^8 + 2*(9*d - 4*f)*x^6 + 3*(9*d - 4*f)*x^4 + 2*(9*d - 4*f)*x^2 + 9*d - 4*f)*log(x^2 - x +
1) - 72*e + 72*g)/(x^8 + 2*x^6 + 3*x^4 + 2*x^2 + 1)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x**3+f*x**2+e*x+d)/(x**4+x**2+1)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.09717, size = 267, normalized size = 1.1 \begin{align*} \frac{1}{144} \, \sqrt{3}{\left (13 \, d + 2 \, f + 16 \, g - 32 \, e\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + \frac{1}{144} \, \sqrt{3}{\left (13 \, d + 2 \, f - 16 \, g + 32 \, e\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x - 1\right )}\right ) + \frac{1}{32} \,{\left (9 \, d - 4 \, f\right )} \log \left (x^{2} + x + 1\right ) - \frac{1}{32} \,{\left (9 \, d - 4 \, f\right )} \log \left (x^{2} - x + 1\right ) - \frac{7 \, d x^{7} - 7 \, f x^{7} + 4 \, g x^{6} - 8 \, x^{6} e + 5 \, d x^{5} - 10 \, f x^{5} + 6 \, g x^{4} - 12 \, x^{4} e + 7 \, d x^{3} - 14 \, f x^{3} + 8 \, g x^{2} - 16 \, x^{2} e - 4 \, d x - 5 \, f x + 6 \, g - 6 \, e}{24 \,{\left (x^{4} + x^{2} + 1\right )}^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x^3+f*x^2+e*x+d)/(x^4+x^2+1)^3,x, algorithm="giac")

[Out]

1/144*sqrt(3)*(13*d + 2*f + 16*g - 32*e)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/144*sqrt(3)*(13*d + 2*f - 16*g + 32
*e)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/32*(9*d - 4*f)*log(x^2 + x + 1) - 1/32*(9*d - 4*f)*log(x^2 - x + 1) - 1/
24*(7*d*x^7 - 7*f*x^7 + 4*g*x^6 - 8*x^6*e + 5*d*x^5 - 10*f*x^5 + 6*g*x^4 - 12*x^4*e + 7*d*x^3 - 14*f*x^3 + 8*g
*x^2 - 16*x^2*e - 4*d*x - 5*f*x + 6*g - 6*e)/(x^4 + x^2 + 1)^2